package com.fuyao.cloud.admin.api.feign;

import com.fuyao.cloud.admin.api.vo.MenuVo;
import com.fuyao.cloud.common.core.constant.ServiceNameConstants;
import com.fuyao.cloud.common.core.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * @author lyhil
 */
@FeignClient(contextId = "remoteMenuService", value = ServiceNameConstants.UPMS_SERVICE)
public interface RemoteMenuService {

    /**
     *
     * @param path
     * @return
     */
    @PostMapping("/menu/findMenuByPath/{path}")
    R<List<MenuVo>> findMenuByPath(@PathVariable("path") String path);

    /**
     *
     * @param permission
     * @return
     */
    @PostMapping("/menu/findMenuByPermission/{permission}")
    R<List<MenuVo>> findMenuByPermission(@PathVariable("permission") String permission);

}
